using System;
using System.IO;
using HgAdapter;

namespace HogoLogic
{
	[Serializable]
	public class HogoProject
	{
		string workingDir = string.Empty;
		string name = string.Empty;
		
		public string Name
		{
			get { return name; }
		}

		public string WorkingDir
		{
			get { return workingDir; }
		}
		
		public bool Inited
		{
			get
			{
				return Directory.Exists(Path.Combine(workingDir, ".hg"));
			}
		}
		
		
		public void Init()
		{
			(new HgInit()).Run(workingDir);
		}

		public HogoProject(string name, string workingDir)
		{
			this.name = name;
			this.workingDir = workingDir;
		}
		
	}
}
